package file;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
/**
 * FileInputStream
 * 节点流
 * 用于从文件中读取字节的流
 * @author Administrator
 *
 */
public class FisDemo {
	public static void main(String[] args) throws IOException {
		FileInputStream fis=new FileInputStream("fos.dat");
		int i=fis.read();
		System.out.println(i);
		byte[] buf=new byte[21];
		int len=fis.read(buf);//97
		System.out.println(len);//21
		String str=new String(buf,"utf-8");
		System.out.println(str);//天安门上太阳升
		
		fis.close();
	}
}
